package co.fitstart.admin.entity.report;

import java.math.BigDecimal;

/**
 * 平均客单价
 * @author haiyan_xiao
 *
 */
public class StudentUnitPrice {
    /** 门店名称 */
    private String siteName;
    
    /** 总金额(元) */
    private Double totalAmount;
    
    /** 客人数 */
    private Long studentNum;
    
    /** 平均客单价 （元/客）*/
    private Double unitPrice;
    
    public StudentUnitPrice() {
        
    }
    
    public StudentUnitPrice(String siteName, Long totalAmount, Long studentNum) {
        if(siteName != null && totalAmount != null && studentNum != null) {
            this.siteName = siteName;
            this.totalAmount = new BigDecimal(totalAmount).divide(new BigDecimal(100)).doubleValue();
            this.studentNum = studentNum;
            this.unitPrice = this.totalAmount/studentNum;
        }
    }
    
    public StudentUnitPrice(Long totalAmount, Long studentNum) {
        if(totalAmount != null && studentNum != null) {
            this.totalAmount = new BigDecimal(totalAmount).divide(new BigDecimal(100)).doubleValue();
            this.studentNum = studentNum;
            this.unitPrice = this.totalAmount/studentNum;
        }
    }

    /**
     * @return the siteName
     */
    public String getSiteName() {
        return siteName;
    }

    /**
     * @return the totalAmount
     */
    public Double getTotalAmount() {
        return totalAmount;
    }

    /**
     * @return the studentNum
     */
    public Long getStudentNum() {
        return studentNum;
    }

    /**
     * @return the unitPrice
     */
    public Double getUnitPrice() {
        return unitPrice;
    }

    /**
     * @param siteName the siteName to set
     */
    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    /**
     * @param totalAmount the totalAmount to set
     */
    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    /**
     * @param studentNum the studentNum to set
     */
    public void setStudentNum(Long studentNum) {
        this.studentNum = studentNum;
    }

    /**
     * @param unitPrice the unitPrice to set
     */
    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }
}
